home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 235 / Issue 235 - September 2007 - DPCS0907DVD.ISO / Extras / NetObjects Fusion / NOF10.exe / data1.cab / FSI / lib / nof / dialogs / SiteDlg.js < prev    next >
Encoding:
JavaScript  |  2007-04-11  |  3.7 KB  |  121 lines

  1. /****i* SOURCE_FILE/INFO
  2.   *
  3.   * NAME
  4.   * SiteDlg.js
  5.   *
  6.   * USAGE
  7.   *  Part of Netobjects JavaScript Library.
  8.   *
  9.   * COPYRIGHT
  10.   *  Copyright ⌐ 2000-2005 Website Pros, Inc.
  11.   *  All Rights Reserved.
  12.   *
  13.   *  This is an unpublished work protected by Website Pros, Inc.
  14.   *  as a trade secret, and is not to be used or disclosed except as
  15.   *  expressly provided in a written license agreement executed by
  16.   *  you and Website Pros, Inc.
  17.   *
  18.   *      <copyright@websitepros.com>
  19.   *
  20.   * NOTES
  21.   *  JavaScript code.
  22.   *
  23.   *****/
  24.  
  25. var IS = IS_getLibHandle();
  26. if (!IS_isModuleInitialized("IS.NOF.DIALOGS.SiteDlg"))
  27. {
  28.   
  29.   /****h* NOF_JavaScript_Library/NOF.DIALOGS.SiteDlg
  30.     *
  31.     * NAME
  32.     *  NOF.DIALOGS.SiteDlg
  33.     *
  34.     * DESCRIPTION
  35.     *    
  36.     * The <code>SiteDlg</code> class
  37.     * External dependencies: NOF.App, NOF.Page
  38.     ****/
  39.   
  40.   /**
  41.     * constructor   
  42.     **/ 
  43.   function DIALOGS_SiteDlg() {
  44.     this.__proto__ = DIALOGS_SiteDlg.prototype;            
  45.   }
  46.   {
  47.     var member = DIALOGS_SiteDlg.prototype;    
  48.     member.CLASS_NAME            = "DIALOGS.SiteDlg";
  49.     
  50.     var method = DIALOGS_SiteDlg.prototype;                            
  51.     /*
  52.       NOF.Page  selectPage(int pX, int pY, int pWidth, int pHeight) 
  53.       String    selectSiteFileToSave(String pName) 
  54.       String    selectSiteFileToOpen(String pName)
  55.       boolean createNewSiteFromTemplate()
  56.       boolean createNewBlankSite()
  57.     */                
  58.     
  59.     /**
  60.     * Allows the user to select for open a Fusion site file in a dialog.
  61.     * @param pName specifies a suggested name.
  62.     * @return the path of the selected site file. If the user cancels the operation 
  63.     * the function returns an empty string.
  64.     **/
  65.     method.selectSiteFileToOpen = function (/*String*/ pName) { 
  66.       return NOF.App.getFSIApp().SelectSiteFile(pName, true);
  67.     }
  68.     
  69.       
  70.     /**
  71.     * Allows the user to select for saving a Fusion site file in a dialog.
  72.     * @param pName specifies a suggested name.
  73.     * @return the path of the selected site file. If the user cancels the operation 
  74.     * the function returns an empty string.
  75.     **/
  76.     method.selectSiteFileToSave = function (/*String*/ pName) { 
  77.       return NOF.App.getFSIApp().SelectSiteFile(pName, false); 
  78.     }
  79.     
  80.     /**
  81.     * Opens a dialog that displays the current site structure that allows the user to 
  82.     * select a node (page) within the site. 
  83.     * The upper left corner is located at the x, y coordinates defined by pX and pY.
  84.     * The width and height of the dialog is defined by pWidth and pHeight. 
  85.     * @param pX
  86.     * @param pY
  87.     * @param pWidth
  88.     * @param pHeight
  89.     * @return the selected Page.
  90.     **/
  91.     method.selectPage = function (/*int*/ pX,/*int*/ pY,/*int*/ pWidth,/*int*/ pHeight) { 
  92.       var retNode = null;
  93.       var selPage = NOF.App.getFSIApp().SelectNode(pX, pY, pWidth, pHeight);
  94.       if (selPage != null) {
  95.         retNode = new NOF.Page();
  96.         retNode.fsiNode = selPage;
  97.       }
  98.       return retNode;
  99.     }
  100.     
  101.     /**
  102.     * Opens a file selection dialog where you can select a template, and then a file selection box 
  103.     * is opened where you can select the name of your new site.
  104.     *
  105.     * @return true if the operation is successful.
  106.     **/
  107.     method.createNewSiteFromTemplate = function () { 
  108.       return NOF.App.getFSIApp2().NewSiteFromTemplate();
  109.     }
  110.     
  111.     /**
  112.     * Opens a file selection dialog where you can select the name of your new site.        
  113.     *
  114.     * @return true if the operation is successful.
  115.     **/
  116.     method.createNewBlankSite = function () { 
  117.       return NOF.App.getFSIApp2().NewBlankSite();
  118.     }
  119.   }
  120.   DIALOGS.__proto__.SiteDlg = DIALOGS_SiteDlg;
  121. }